package com.entity;

import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor;
import org.springframework.stereotype.Component;

@Component
public class BookEntity implements InitializingBean, DisposableBean {
    @Override
    public void destroy() throws Exception {
        System.out.println("BookEntity 销毁前执行");
    }

    @Override
    public void afterPropertiesSet() throws Exception {
        System.out.println("BookEntity实例化完成");
    }
}